package state;

/**
 * @author wcj
 * @Date 2021/6/30 22:22
 * @Version 1.0
 */
public class FinishWorkState extends State {
    @Override
    public void writeProgram(Work work) {
        if (work.getHour() > 21) {
            if (work.getWorkFinished()) {
                System.out.println("下班啦下班啦!");
            } else {
                work.setCurrent(new WorkOverTimeState());
                work.writeProgram();
            }
        }
    }
}
